<?php
/**
 * 行业宝模块小程序接口定义
 *
 * @author wangbosichuang
 * @url 
 */
defined('IN_IA') or exit('Access Denied');

class hyb_jianzhiModuleWxapp extends WeModuleWxapp {
	//获取用户信息
    public function doPageTyMember() {
        global $_GPC, $_W;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        $item['u_name'] = $_GPC['u_name'];
        $item['u_thumb'] = $_GPC['u_thumb'];
        $item['uniacid'] = $uniacid;
        if ($openid) {
            $res = pdo_update('hyb_jianzhi_userinfo', $item, array('openid' => $openid));
        }
        if (!$res['u_id']) {
            $res = pdo_fetch('SELECT `u_id` FROM ' . tablename('hyb_jianzhi_userinfo') . " where `openid`='{$openid}'");
        }
        $message = 'success';
        $errno = 0;
        return $this->result($errno, $message, $item);
    }
    public function doPageGetUid() {
        global $_GPC, $_W;
        $uniacid = $_W['uniacid'];
        $result = pdo_fetch('SELECT * FROM ' . tablename('hyb_jianzhi_key') . " where `uniacid`='{$uniacid}'");
        $APPID = $result['appid'];
        $SECRET = $result['appsecret'];
        $code = trim($_GPC['code']);
        $url = "https://api.weixin.qq.com/sns/jscode2session?appid={$APPID}&secret={$SECRET}&js_code={$code}&grant_type=authorization_code";
        $data['userinfo'] = json_decode($this->httpGet($url));
        $openid = $data['userinfo']->openid;
        $item['openid'] = $openid;
        if ($openid) {
            $res = pdo_fetch('SELECT `u_id` FROM ' . tablename('hyb_jianzhi_userinfo') . " where `openid`='{$openid}'");
            if (!$res['u_id']) {
                $res = pdo_insert('hyb_jianzhi_userinfo', $item);
            }
        }
        $data['openid'] = $openid;
        $message = 'success';
        $errno = 0;
        return $this->result($errno, $message, $data);
    }
    private function httpGet($url) {
        $curl = curl_init();
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_TIMEOUT, 500);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_URL, $url);
        $res = curl_exec($curl);
        curl_close($curl);
        return $res;
    }

    //查询基本设置
    public function doPageBase()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        //查询基本信息
        $base = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_base")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
        return $this->result(0,"success",$base);
    }
    //骗审信息
    public function doPagePianlist()
    {
     global $_GPC,$_W;
      $uniacid = $_W['uniacid'];
      $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_pian")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
      foreach ($list as &$value) {
        $value['thumb'] = $_W['attachurl'].$value['thumb'];
      }
      return $this->result(0,"success",$list);
    }
    //骗审信息详情
    public function doPagePianxinxixq()
    {
      global $_W,$_GPC;
      $uniacid = $_W['uniacid'];
      $id = $_REQUEST['id'];
      $list = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_pian")."  where uniacid=:uniacid and id=:id",array(":uniacid"=>$uniacid,":id"=>$id));
      $list['thumb'] = $_W['attachurl'].$list['thumb'];
      return $this->result(0,"success",$list);
    }

 //骗审导航设置
    public function doPagePiandaohang()
    {
        global $_GPC,$_W;
        $uniacid = $_W['uniacid'];
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_pian_daohang")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
        foreach ($list as &$value) {
            $value['thumb'] = $_W['attachurl'].$value['thumb'];
        }
        return $this->result(0,"success",$list);
    }
    //查询幻灯片
    public function doPageHuandengpian()
    {
        global $_GPC,$_W;
        $uniacid = $_W['uniacid'];
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_huandengpian")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
        foreach ($list as &$value) {
            $value['thumb'] = $_W['attachurl'].$value['thumb'];
        }
        return $this->result(0,"success",$list);
    }

    //查询导航
    public function doPageDaohang()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_daohang")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
        foreach ($list as &$value) {
            $value['thumb'] = $_W['attachurl'].$value['thumb'];
            $value['thumb2'] = $_W['attachurl'].$value['thumb2'];
        }
        return $this->result(0,"success",$list);
    }

    //查询地区
    public function doPageDiqu()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        // $shi = $_REQUEST['city'];
        // $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_diqu")." where uniacid=:uniacid and shi=:shi",array(":uniacid"=>$uniacid,":shi"=>$shi));
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_chengshi")." where uniacid=:uniacid",array(":uniacid"=>$uniacid));
        return $this->result(0,"success",$list);
    }

    //查询兼职分类
    public function doPageJianzhi_style()
    {
        global $_GPC,$_W;
        $uniacid = $_W['uniacid'];
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_style")." where uniacid=:uniacid order by ids desc ",array(":uniacid"=>$uniacid));
        return $this->result(0,"success",$list);
    }

    //短信验证码
    public function doPageSendSms(){
        require_once MODULE_ROOT.'/aliyun-dysms-php-sdk/api_demo/SmsDemo.php';
        $code = cache_load('code');
        $res['status']=1;
        $res['code']=$code;
        return $this->result(0,'success',$res);
    }

    //用户信息
    public function doPageUser(){
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        $info = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_userinfo")." where uniacid=:uniacid and openid=:openid",array(":uniacid"=>$uniacid,":openid"=>$openid));
        return $this->result(0,"success",$info);
    }

    //用户信息注册[修改]
    public function doPageUserxin()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        $data = array(
            "uniacid"=>$uniacid,
            "u_bname"=>$_REQUEST['userName'],
            "u_sex"=>$_REQUEST['userSex'],
            "u_chusheng"=>$_REQUEST['userDate'],
            "u_shengao"=>$_REQUEST['userHeight'],
            "u_jiaoyu"=>$_REQUEST['userJiaoyu'],
            "u_shcool"=>$_REQUEST['userSchool'],
            "u_email"=>$_REQUEST['userEmail'],
            "u_qq"=>$_REQUEST['userQq'],
            "u_tel"=>$_REQUEST['telphone'],
            "u_content"=>$_REQUEST['userIntroduce'],
            "u_typs"=>"待审核",
        );
        $res = pdo_update("hyb_jianzhi_userinfo",$data,array("openid"=>$openid));
    }

    //查询商家信息
    public function doPageShangjiainfo()
    {
        global $_GPC,$_W;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        $info = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_shangjia")." as s left join ".tablename("hyb_jianzhi_userinfo")." as u on s.s_openid=u.openid where s.uniacid=:uniacid and s.s_openid=:s_openid",array(":uniacid"=>$uniacid,":s_openid"=>$openid));
        if (!empty($info)) {
            $info['jiezhi'] = floor((strtotime($info['s_ruzhuendtime'])-strtotime(date("Y-m-d H:i:s",time())))/86400);
            $info['s_imgpath'] = unserialize($info['s_imgpath']);
        }
        
        return $this->result(0,"success",$info);
    }

    //商家入驻[修改]
    public function doPageShopruzhu()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $imgpath = $_REQUEST['imgpath'];
        $imgpath = str_replace('"',"",str_replace("]","",str_replace("[","", $imgpath)));
        $imgpath = explode(",",$imgpath);
        $imgpaths = serialize($imgpath);
        if ($_REQUEST['typs']=="入驻") {
          $data = array(
                "uniacid"=>$uniacid,
                "s_name"=>$_REQUEST['store_name'],
                "s_fuze"=>$_REQUEST['name'],
                "s_openid"=>$_REQUEST['openid'],
                "s_tel"=>$_REQUEST['tel'],
                "s_thumb"=>$_REQUEST['mendian'],
                "s_yinye"=>$_REQUEST['yingyezhizhao'],
                "s_imgpath"=>$imgpaths,
                "s_address"=>$_REQUEST['loc_address'],
                "s_lat"=>$_REQUEST['loc_lat'],
                "s_lon"=>$_REQUEST['loc_lon'],
                "s_ruzhu"=>$_REQUEST['ruzhu'],
                "s_ruzhutime"=>date("Y-m-d H:i:s",time()),
                "s_ruzhuendtime"=>date('Y-m-d H:i:s', strtotime("+1 year")),
                "s_typs"=>"待审核",
            );  
            $res = pdo_insert("hyb_jianzhi_shangjia",$data);
        }
        if ($_REQUEST['typs']=="编辑") {
            $data = array(
                "uniacid"=>$uniacid,
                "s_name"=>$_REQUEST['store_name'],
                "s_fuze"=>$_REQUEST['name'],
                "s_openid"=>$_REQUEST['openid'],
                "s_tel"=>$_REQUEST['tel'],
                "s_thumb"=>$_REQUEST['mendian'],
                "s_yinye"=>$_REQUEST['yingyezhizhao'],
                "s_imgpath"=>$imgpaths,
                "s_address"=>$_REQUEST['loc_address'],
                "s_lat"=>$_REQUEST['loc_lat'],
                "s_lon"=>$_REQUEST['loc_lon'],
                "s_typs"=>"待审核",
            ); 
            $res = pdo_update("hyb_jianzhi_shangjia",$data,array("s_openid"=>$_REQUEST['openid'])); 
        }
        
    }


    //商家入驻续费
    public function doPageRusave()
    {
        global $_GPC,$_W;
        $openid = $_REQUEST['openid'];
        $data =array(
            "s_ruzhu"=>$_REQUEST['zhiding_money'],
            "s_ruzhutime"=>date("Y-m-d H:i:s",time()),
            "s_ruzhuendtime"=>date('Y-m-d H:i:s', strtotime("+1 year")),
        );
        $res = pdo_update("hyb_jianzhi_shangjia",$data,array("s_openid"=>$openid));
    }

    //图片上传

    public function doPageUrl()
    {
       global $_W;
       echo $_W['siteroot'];
    }
    //单图
    public function doPageUpload()
    {
        global $_W, $_GPC;  
        $uniacid = $_W['uniacid'];
        if ($_W['setting']['remote']['type']==0) {  //什么不开启
            $uptypes = array('image/jpg', 'image/jpeg', 'image/png', 'image/pjpeg', 'image/gif', 'image/bmp', 'image/x-png');
            $max_file_size = 2000000;
            $destination_folder = '../attachment/hyb_jianzhi/';  //图片文件夹路径
            //创建存放图片的文件夹
            if (!is_dir($destination_folder)) {
               $res = mkdir($destination_folder, 0777, true);
            }
            if (!is_uploaded_file($_FILES['upfile']['tmp_name'])) {
                echo '图片不存在!';
                die;
            }
            $file = $_FILES['upfile'];
            if ($max_file_size < $file['size']) {
                echo '文件太大!';
                die;
            }
            if (!in_array($file['type'], $uptypes)) {
                echo '文件类型不符!' . $file['type'];
                die;
            }

            $filename = $file['tmp_name'];
            $pinfo = pathinfo($file['name']);
            $ftype = $pinfo['extension'];
            $destination = $destination_folder . str_shuffle(time() . rand(111111, 999999)) . '.' . $ftype;
            if (file_exists($destination) && $overwrite != true) {
                echo '同名文件已经存在了';
                die;
            }
            if (!move_uploaded_file($filename, $destination)) {
                echo '移动文件出错';
                die;
            }
            $pinfo = pathinfo($destination);
            $fname = $_W['attachurl'].'hyb_jianzhi/'.$pinfo['basename'];    
            echo $fname; 
        }
        else if($_W['setting']['remote']['type']==2)   //远程附件oss
        {       
            //将本地图片先上传到服务器
            load()->func('file');
            $file = $_FILES['upfile'];
            $filename = $file['tmp_name'];
            $destination_folder = '../attachment/images/'.$_W['uniacid'].'/'.date('Y/m/').'/';  //图片文件夹路径
            //创建存放图片的文件夹
            if (!is_dir($destination_folder)) {
               $res = mkdir($destination_folder, 0777, true);
            }
            if (!is_uploaded_file($_FILES['upfile']['tmp_name'])) {
                echo '图片不存在!';
                die;
            }
           
            $pinfo = pathinfo($file['name']);
            $ftype = $pinfo['extension'];
            $destination = $destination_folder . str_shuffle(time() . rand(111111, 999999)) . '.' . $ftype;
            if (file_exists($destination) && $overwrite != true) {
                echo '同名文件已经存在了';
                die;
            }
            if (!move_uploaded_file($filename, $destination)) {
                echo '移动文件出错';
                die;
            }
            $pinfo = pathinfo($destination);
            $filename = 'images/'.$_W['uniacid'].'/'.date('Y/m/').$pinfo['basename'];

            //将服务器上的图片转移到阿里云oss
           
            $remote = $_W['setting']['remote'];
            require_once(IA_ROOT . '/framework/library/alioss/autoload.php');
            load()->model('attachment');
            $endpoint = 'http://'.$remote['alioss']['ossurl'];
            try {
                $ossClient = new \OSS\OssClient($remote['alioss']['key'], $remote['alioss']['secret'], $endpoint);              
                $ossClient->uploadFile($remote['alioss']['bucket'],$filename, ATTACHMENT_ROOT.$filename);
            } catch (\OSS\Core\OssException $e) {
                return error(1, $e->getMessage());
              
            }
            if ($auto_delete_local) {
                unlink($filename);
            }
            //删除服务器上的上传文件
            unlink(ATTACHMENT_ROOT.$filename);
           $fname = $remote['alioss']['url'].'/'.$filename;
           echo $fname;
            
        }
        else if($_W['setting']['remote']['type']==3)   //远程附件 七牛云
        {
            /*
                上传文件名       $filekey     $_FILES['upfile']['name']
                上传文件的路径   $filePath    $_FILES['upfile']['tmp_name']
                上传凭证         $upToken    
            */
             require_once(IA_ROOT . '/framework/library/qiniu/autoload.php');
             $qiniu = $_W['setting']['remote']['qiniu'];
             $accessKey=$qiniu['accesskey'];
             $secretKey=$qiniu['secretkey'];
             $bucket=$qiniu['bucket'];
             //转码时使用的队列名称
             // $pipeline = $qiniu['qn_queuename'];
              //$pipeline = 'yinyue';
             //要进行转码的转码操作
             $fops = "avthumb/mp4/ab/64k/ar/44100/acodec/libfaac";
             $auth = new Qiniu\Auth($accessKey, $secretKey); 

             $filekey=$_FILES['upfile']['name'];         //上传文件名
             $filePath=$_FILES['upfile']['tmp_name'];    //上传文件的路径

             //可以对转码后的文件进行使用saveas参数自定义命名，当然也可以不指定文件会默认命名并保存在当间
             $savekey =  Qiniu\base64_urlSafeEncode($bucket.':'.$filekey.'_1');
             $fops = $fops.'|saveas/'.$savekey;
             $policy = array(
                     'persistentOps' => $fops,
                     //'persistentPipeline' => $pipeline
             );
             $uptoken = $auth->uploadToken($bucket, null, 3600, $policy);    //上传凭证
             //上传文件的本地路径
             $uploadMgr = new Qiniu\Storage\UploadManager();
             $ss = $uploadMgr->putFile($uptoken, $filekey, $filePath);
             load()->func("logging");
             $error=logging_run("qiniu:error".$err."成个");
             if ($err !== null) {
                 load()->func("logging");
                 logging_run("qiniu:error");
                 return false;
             }
             $fname=$qiniu['url'].'/'.$ss[0]['key'];
             echo $fname;
        }         
              
    }

    //支付
    public function doPagePay()
    {
        global $_GPC, $_W;
        include 'wxpay.php';
        $res = pdo_get('hyb_jianzhi_key', array('uniacid' => $_W['uniacid']));
        $appid = $res['appid'];
        $openid = $_GPC['openid'];
        $mch_id = $res['mch_id'];
        $key = $res['appkey'];
        $out_trade_no = $mch_id . time();
        $total_fee = $_GPC['zhiding_money'];
        if (empty($total_fee)) {
            $body = '订单付款';
            $total_fee = floatval(99 * 100);
        } else {
            $body = '订单付款';
            $total_fee = floatval($total_fee * 100);
        }
        $weixinpay = new WeixinPay($appid, $openid, $mch_id, $key, $out_trade_no, $body, $total_fee);
        $return = $weixinpay->pay();
        echo json_encode($return);
    }

    //兼职发布
    public function doPageFabu()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $zhiding_daynum = $_REQUEST['zhiding_daynum'];
        if ($_REQUEST['zhiding']=="false") {
            $data = array(
                "uniacid"=>$uniacid,
                "f_openid"=>$_REQUEST['openid'],
                "f_name"=>$_REQUEST['userName'],
                "f_daiyu"=>$_REQUEST['daiyu'],
                "f_leixing"=>$_REQUEST['g_typs'],
                "f_renshu"=>$_REQUEST['usertype'],
                "f_sex"=>$_REQUEST['sex'],
                "f_fuze"=>$_REQUEST['userNameReal'],
                "f_fuzetel"=>$_REQUEST['userPhone'],
                "f_content"=>$_REQUEST['userFamily'],
                "f_gztime1"=>$_REQUEST['time'],
                "f_gztime2"=>$_REQUEST['time1'],
                "f_gzdate1"=>$_REQUEST['date'],
                "f_gzdate2"=>$_REQUEST['date1'],
                "f_address"=>$_REQUEST['address'],
                "f_lat"=>$_REQUEST['lat'],
                "f_lon"=>$_REQUEST['lon'],
                "f_zhiding"=>"否",
                "f_typs"=>"待审核",
                "f_time"=>date("Y-m-d H:i:s",time()),
            );
            $res = pdo_insert("hyb_jianzhi_jianzhi",$data);
        }else if ($_REQUEST['zhiding']=="true"){
            $data = array(
                "uniacid"=>$uniacid,
                "f_openid"=>$_REQUEST['openid'],
                "f_name"=>$_REQUEST['userName'],
                "f_daiyu"=>$_REQUEST['daiyu'],
                "f_leixing"=>$_REQUEST['g_typs'],
                "f_renshu"=>$_REQUEST['usertype'],
                "f_sex"=>$_REQUEST['sex'],
                "f_fuze"=>$_REQUEST['userNameReal'],
                "f_fuzetel"=>$_REQUEST['userPhone'],
                "f_content"=>$_REQUEST['userFamily'],
                "f_gztime1"=>$_REQUEST['time'],
                "f_gztime2"=>$_REQUEST['time1'],
                "f_gzdate1"=>$_REQUEST['date'],
                "f_gzdate2"=>$_REQUEST['date1'],
                "f_address"=>$_REQUEST['address'],
                "f_lat"=>$_REQUEST['lat'],
                "f_lon"=>$_REQUEST['lon'],
                "f_zhiding"=>"是",
                "f_zhiding_daynum"=>$zhiding_daynum,
                "f_zhiding_endtime"=>date('Y-m-d H:i:s',strtotime("$time +$zhiding_daynum day")),
                "f_zhiding_money"=>$_REQUEST['zhiding_money'],
                "f_typs"=>"待审核",
                "f_time"=>date("Y-m-d H:i:s",time()),
            );
            $res = pdo_insert("hyb_jianzhi_jianzhi",$data);
        }
        
    }

    //查询兼职信息
    public function doPageJianzhi_info()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $city = $_REQUEST['city'];
        $quyu = $_REQUEST['quyu'];
        $leixing = $_REQUEST['leixing'];
        $shijian = $_REQUEST['shijian'];
        $address = $city.''.$quyu;
        // $data = array("quyu"=>$quyu,"leixing"=>$leixing,"shijian"=>$shijian);
        // var_dump($data);
        //查询基本设置
        $base= pdo_fetch("SELECT * FROM ".tablename('hyb_jianzhi_base')."WHERE uniacid = :uniacid",array(':uniacid' => $uniacid));
        if ($base['zd_num']=="0" && $base['zd_type']=="0") {
            if ($quyu=="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_typs=:f_typs order by j.f_time desc",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing and j.f_typs=:f_typs order by j.f_time desc",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {              
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[]= $value;
                       }
                    }
                }
                
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing and j.f_typs=:f_typs order by j.f_time desc",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing and j.f_typs=:f_typs order by j.f_time desc",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
        }
        else if ($base['zd_num']=="0" && $base['zd_type']!="0") {       
            if ($quyu=="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid and j.f_address like '%$city%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc  ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {              
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[]= $value;
                       }
                    }
                }
                
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
        }
        else if ($base['zd_num']!="0" && $base['zd_type']=="0") {       
            if ($quyu=="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%'  and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {              
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[]= $value;
                       }
                    }
                }
                
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing  and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
        }
        else if ($base['zd_num']!="0" && $base['zd_type']!="0") {       
            if ($quyu=="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid and j.f_address like '%$city%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu=="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {              
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[]= $value;
                       }
                    }
                }
                
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian=="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
            }
            if ($quyu!="全部" && $leixing=="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%'  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过"));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu=="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($list as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
            if ($quyu!="全部" && $leixing!="全部" && $shijian!="全部") {
                $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$address%' and j.f_leixing=:f_leixing  and j.f_zhiding=:f_zhiding and j.f_typs=:f_typs order by j.f_time desc limit ".$base['zd_num'],array(":uniacid"=>$uniacid,":f_zhiding"=>"是",":f_typs"=>"审核通过",":f_leixing"=>$leixing));
                if ($shijian=="长期兼职") {               
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }

                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=30){
                         $info[$key]= $value;
                       }
                    }
                }
                if ($shijian=="短期兼职") {
                    foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<30 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>7){
                         $info[$key]= $value;
                       }
                    }
                }
                if($shijian=="临时兼职"){
                   foreach ($info as $key =>$value) {
                        $value['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                        if(strpos($value['f_address'],"县") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                        }else if(strpos($value['f_address'],"区") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                        }else if(strpos($value['f_address'],"市") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                        }else if(strpos($value['f_address'],"旗") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                        }else if(strpos($value['f_address'],"处") !== false){
                            $value['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                        }
                       if(floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)>=0 && floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400)<=7){
                         $info[$key]= $value;
                       }
                    }
                }
            }
        }
        if (!empty($info)) {

            foreach ($info as &$value) {
                $jianzhi_style = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_style")." where uniacid=:uniacid and title=:title",array(":uniacid"=>$uniacid,":title"=>$value['f_leixing']));
                $value['thumb'] = $_W['attachurl'].$jianzhi_style['thumb'];
            }
        }
        
        return $this->result(0,"success",$info);
    }
    

    //兼职信息检索
    public function doPageJianzhi_list()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $city = $_REQUEST['city'];
        $con = $_REQUEST['con'];
        $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_leixing=:f_leixing and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_leixing"=>$con));
        foreach ($info as $key => $value) {
                $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                if(strpos($value['f_address'],"县") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                }else if(strpos($value['f_address'],"区") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                }else if(strpos($value['f_address'],"市") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                }else if(strpos($value['f_address'],"旗") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                }else if(strpos($value['f_address'],"处") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                }
                
            }
        if (!empty($info)) {
            // foreach ($info as &$value) {

            //     $value['thumb'] = $_W['attachurl'].$value['thumb'];
            // }
            foreach ($info as &$value) {
                $jianzhi_style = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_style")." where uniacid=:uniacid and title=:title",array(":uniacid"=>$uniacid,":title"=>$value['f_leixing']));
                $value['thumb'] = $_W['attachurl'].$jianzhi_style['thumb'];
            }
        }
        return $this->result(0,"success",$info);
    }
    public function doPageJianzhi_lists()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $city = $_REQUEST['city'];
        $con = $_REQUEST['content'];
        $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid and j.f_address like '%$city%' and j.f_name like '%$con%' and j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过"));
            foreach ($info as $key => $value) {
                $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                if(strpos($value['f_address'],"县") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                }else if(strpos($value['f_address'],"区") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                }else if(strpos($value['f_address'],"市") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                }else if(strpos($value['f_address'],"旗") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                }else if(strpos($value['f_address'],"处") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                }
                
            }
            if (!empty($info)) {
                // foreach ($info as &$value) {
                //     $value['thumb'] = $_W['attachurl'].$value['thumb'];
                // }
                foreach ($info as &$value) {
                    $jianzhi_style = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_style")." where uniacid=:uniacid and title=:title",array(":uniacid"=>$uniacid,":title"=>$value['f_leixing']));
                    $value['thumb'] = $_W['attachurl'].$jianzhi_style['thumb'];
                }
            }
        return $this->result(0,"success",$info);
    }


    //查询用户兼职
    public function doPageUserjianzhi()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        $info = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." as j  where j.uniacid=:uniacid  and j.f_openid=:f_openid and  j.f_typs=:f_typs order by j.f_time desc ",array(":uniacid"=>$uniacid,":f_typs"=>"审核通过",":f_openid"=>$openid));
            if (!empty($info)) {
                foreach ($info as $key => $value) {
                    $info[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                    if(strpos($value['f_address'],"县") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                    }else if(strpos($value['f_address'],"区") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                    }else if(strpos($value['f_address'],"市") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                    }else if(strpos($value['f_address'],"旗") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                    }else if(strpos($value['f_address'],"处") !== false){
                        $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                    }
                    
                }
                // foreach ($info as &$value) {
                //     $value['thumb'] = $_W['attachurl'].$value['thumb'];
                // }
                foreach ($info as &$value) {
                    $jianzhi_style = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_style")." where uniacid=:uniacid and title=:title",array(":uniacid"=>$uniacid,":title"=>$value['f_leixing']));
                    $value['thumb'] = $_W['attachurl'].$jianzhi_style['thumb'];
                }
            }
        return $this->result(0,"success",$info);
    }

    //查询兼职信息详情
    public function doPageJianzhi_infoxq()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $f_id = $_REQUEST['f_id'];
        $info = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_jianzhi")." where uniacid=:uniacid and f_id=:f_id",array(":uniacid"=>$uniacid,":f_id"=>$f_id));
        if (empty($info['f_gongsi'])) {
            //查询商家信息
            $shangjia = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_shangjia")." where uniacid=:uniacid and s_openid=:s_openid",array(":uniacid"=>$uniacid,":s_openid"=>$info['f_openid']));
            $info['f_gongsi'] = $shangjia['s_name'];
        }
        return $this->result(0,"success",$info);
    }

    //查询用户是否报名
    public function doPageUserbaiming()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $b_mid = $_REQUEST['f_id'];
        $openid = $_REQUEST['openid'];
        $list = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." where uniacid=:uniacid and b_mid=:b_mid and b_openid=:b_openid",array(":uniacid"=>$uniacid,":b_mid"=>$b_mid,":b_openid"=>$openid));
        return $this->result(0,"success",$list);
    }

    //查询用户报名
    public function doPageUserbaominglist()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $openid = $_REQUEST['openid'];
        if ($_REQUEST['n_id']==0) {
            $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." as b left join ".tablename("hyb_jianzhi_jianzhi")." as j on b.b_mid=j.f_id left join ".tablename("hyb_jianzhi_style")." as js on j.f_leixing=js.title where b.uniacid=:uniacid  and b.b_openid=:b_openid",array(":uniacid"=>$uniacid,":b_openid"=>$openid));
        }  
        if ($_REQUEST['n_id']==1) {
            $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." as b left join ".tablename("hyb_jianzhi_jianzhi")." as j on b.b_mid=j.f_id left join ".tablename("hyb_jianzhi_style")." as js on j.f_leixing=js.title where b.uniacid=:uniacid  and b.b_openid=:b_openid and b.b_typs=:b_typs",array(":uniacid"=>$uniacid,":b_openid"=>$openid,":b_typs"=>"已报名"));
        }  
        if ($_REQUEST['n_id']==2) {
            $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." as b left join ".tablename("hyb_jianzhi_jianzhi")." as j on b.b_mid=j.f_id left join ".tablename("hyb_jianzhi_style")." as js on j.f_leixing=js.title where b.uniacid=:uniacid  and b.b_openid=:b_openid and b.b_typs=:b_typs",array(":uniacid"=>$uniacid,":b_openid"=>$openid,":b_typs"=>"已录用"));
        } 
        if (!empty($list)) {
            foreach ($list as $key => $value) {
                $list[$key]['f_tianshu'] = floor((strtotime($value['f_gzdate2'])-strtotime($value['f_gzdate1']))/86400);
                if(strpos($value['f_address'],"县") !== false){
                    $list[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "县"))*(-1));
                }else if(strpos($value['f_address'],"区") !== false){
                    $list[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "区"))*(-1));
                }else if(strpos($value['f_address'],"市") !== false){
                    $list[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "市"))*(-1));
                }else if(strpos($value['f_address'],"旗") !== false){
                    $list[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "旗"))*(-1));
                }else if(strpos($value['f_address'],"处") !== false){
                    $info[$key]['f_addressss'] = substr($value['f_address'], strlen("市")+strpos($value['f_address'], "市"),(strlen($value['f_address']) - strpos($value['f_address'], "处"))*(-1));
                }
                    
            }
        }              
        if (!empty($list)) {
            foreach ($list as &$value) {
                $value['thumb'] = $_W['attachurl'].$value['thumb'];
            }
        }
        return $this->result(0,"success",$list);
    }

    //兼职报名
    public function doPageBaoming()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $data = array(
            "uniacid"=>$uniacid,
            "b_mid"=>$_REQUEST['b_id'],
            "b_openid"=>$_REQUEST['opeid'],
            "b_typs"=>"已报名",
            "b_content"=>$_REQUEST['youdian'],
        );
        $res = pdo_insert("hyb_jianzhi_baoming",$data);
    }

    //兼职报名删除
    public function doPageBaomingdel()
    {
        global $_W,$_GPC;
        $b_id = $_REQUEST['b_id'];
        $res = pdo_delete("hyb_jianzhi_baoming",array("b_id"=>$b_id));
    }

    //兼职报名录用
    public function doPageBaomingsave()
    {
        global $_W,$_GPC;
        $b_id = $_REQUEST['b_id'];
        $data = array("b_typs"=>"已录用");
        $res = pdo_update("hyb_jianzhi_baoming",$data,array("b_id"=>$b_id));
    }


    //兼职删除
    public function doPageFabudel()
    {
        global $_W,$_GPC;
        $f_id = $_REQUEST['f_id'];
        $res = pdo_delete("hyb_jianzhi_jianzhi",array("f_id"=>$f_id));
    }

    //兼职置顶修改
    public function doPageZdsave()
    {
        global $_W,$_GPC;
        $zhiding_daynum = $_REQUEST['tianshu'];
        $zhiding_money = $_REQUEST['zhiding_money'];
        $id = $_REQUEST['id'];
        $time = date("Y-m-d H:i:s",time());
        $zhiding_endtime = date('Y-m-d H:i:s',strtotime("$time +$zhiding_daynum day")); 
        $data = array(
            "f_zhiding"=>"是",
            "f_zhiding_daynum"=>$tianshu,
            "f_zhiding_money"=>$zhiding_money,
            "f_zhiding_endtime"=>$zhiding_endtime,
        );
        $res = pdo_update("hyb_jianzhi_jianzhi",$data,array("f_id"=>$id));
    }

    //兼职报名
    public function doPageJianzhibaoming()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $f_id = $_REQUEST['f_id'];
        $list = pdo_fetchall("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." as b left join ".tablename("hyb_jianzhi_userinfo")." as u on b.b_openid=u.openid where b.uniacid=:uniacid and b.b_mid=:b_mid",array(":uniacid"=>$uniacid,":b_mid"=>$f_id));
        return $this->result(0,"success",$list);
    }

    //兼职报名详情
    public function doPageJianzhibaomingxq()
    {
        global $_W,$_GPC;
        $uniacid = $_W['uniacid'];
        $f_id = $_REQUEST['b_id'];
        $list = pdo_fetch("SELECT * FROM ".tablename("hyb_jianzhi_baoming")." as b left join ".tablename("hyb_jianzhi_userinfo")." as u on b.b_openid=u.openid where b.uniacid=:uniacid and b.b_id=:b_id",array(":uniacid"=>$uniacid,":b_id"=>$f_id));
        return $this->result(0,"success",$list);
    }
}



